import React from 'react'
import { Redirect } from 'react-router-dom'

const ZHDiscover=React.lazy(_ =>import('../pages/discover')) 

const ZHRecommend =React.lazy(_ => import('../pages/discover/c-pages/recommend')) 
const ZHRanking =React.lazy(_ => import('../pages/discover/c-pages/ranking')) 
const ZHSongs =React.lazy(_ => import('../pages/discover/c-pages/songs')) 
const ZHDjradio =React.lazy(_ => import('../pages/discover/c-pages/djradio'))
const ZHArtist =React.lazy(_ => import('../pages/discover/c-pages/artist')) 
const ZHAlbum =React.lazy(_ => import('../pages/discover/c-pages/album')) 
// const ZHPlayer = React.lazy(_ => import('../pages/player'))

const ZHFriend =React.lazy(_ => import('@/pages/friend')) 
const ZHMine =React.lazy(_ => import('@/pages/mine'))  


const routes =[
  {
    path:"/",
    exact:true,
    render:() => (<Redirect to="/discover"/>)
  },
  {
    path:"/discover",
    component:ZHDiscover,
    routes:[
      {
        path:"/discover",
        exact:true,
        render:() => (
          <Redirect to="/discover/recommend"/>
        )
      },
      {
        path:"/discover/recommend",
        component:ZHRecommend
      },
      {
        path:"/discover/ranking",
        component:ZHRanking
      },
      {
        path:"/discover/songs",
        component:ZHSongs
      },
      {
        path:"/discover/djradio",
        component:ZHDjradio
      },
      {
        path:"/discover/artist",
        component:ZHArtist
      },
      {
        path:"/discover/album",
        component:ZHAlbum
      },
    ]
  },
  {
    path:"/mine",
    component:ZHMine
  },
  {
    path:"/friend",
    component:ZHFriend
  },
]

export default routes